Return to doc.sitecore.com

2.  Installation Guide (Sitecore 5.3)
Prev

The Northwind Data Provider is distributed as a standard Sitecore package. Thus, to start using it, you should install the package. The following steps are required to make this example work:  

  1. Make sure you have the Northwind sample MSSQL database, which is available for any MS SQL installation (except MSDE), installed.
     
  2. Install the NorthwindDataProvider.zip package.
     
  3. Modify the web.config file  

The NorthwindDataProvider.zip package adds the following Items to Sitecore:

  1. Templates:
    /system/templates/Northwind Data Provider/Northwind Customer
    id: {31975406-5987-4390-9151-8F28D11683A4} with the fields:
    ContactName :Text
    CompanyName:Text
    Address:Text
    City
    :Text
     
    /system/templates/Northwind Data Provider/Northwind Data Provider
    id: {9AFF70A1-31E4-48F9-8461-F0DC33F4F77C} with no fields (this template only serves as a root Item template).
     
  2. An Item
    /content/Home/Northwind Data Provider
    This Item in the content tree will serve as a parent for all dynamically provided Items. These Items are shown in the content tree of the Master database, but, in fact, they are located in an external database.  

2.1.  Make changes to the web.config file

2.1.1.  Add the <dataProvider ref="dataProviders/northwindDataProvider"/> definition as shown below:

<!-- master -->
<database id="master" singleInstance="true" type="Sitecore.Data.Database, Sitecore.Kernel">
    
<param desc="name">$(id)</param>
        
<dataProviders hint="list:AddDataProvider">          
<!-- ADD THE LINE BELOW -->
<dataProvider ref="dataProviders/northwindDataProvider"/>
<dataProvider ref="dataProviders/main" param1="$(id)"/>
        
</dataProviders>
    ...
    
</database>

2.1.2.  Add the <northwindDataProvider... </northwindDataProvider> definition as shown below:

     <northwindDataProvider type="Sitecore.Data.DataProviders.NorthwindDataProvider, Sitecore.NorthwindDataProvider">
        
<param desc="connection">server=(local);User="server user name";password="server password";database=northwind</param>
        
<param desc="table">Customers</param>
        
<param desc="fieldsNames">ContactName,CompanyName,Address,City</param>
        
<param desc="idField">CustomerID</param>
        
<param desc="nameField">ContactName</param>
        
<param desc="filter">Country='germany'</param>
        
<param desc="templateID">{31975406-5987-4390-9151-8F28D11683A4}</param>
        
<param desc=" parentItemID "> {DF2ECE22-5BFE-4ABD-A42B-F7AA0DEDB40A} </param>
        
<param desc="hostDatabase ">master</param>
      
</northwindDataProvider>...
  
</dataProviders>

Restart the Client and go to the Content Editor. Expand the /content/home/Northwind Data Provider Item in the Master database. You will be able to see all Items extracted by the Data Provider: 


Prev